<?php

class defaultApp extends Control {
	
	public function index () {
		// 古诗词 http://www.oklink.net/gdwx/shici/index.html
		$book_mod = &get_model("book");
		
		$line1_1 = $book_mod->get_top_book(); // 最新收录
		$line1_2 = $book_mod->get_top_book(9); // 先秦哲学
		$line1_3 = $book_mod->get_top_book(5); // 古典小说
		$line1_4 = $book_mod->get_top_book(6); // 中国诗词
		
		$line2_1 = $book_mod->get_top_book(0,"views DESC"); // 热门排行
		$line2_2 = $book_mod->get_top_book(10); // 西方哲学
		$line2_3 = $book_mod->get_top_book(7); // 外国小说
		$line2_4 = $book_mod->get_top_book(12); // 历史地理
		
		$this->assign("line1_1", $line1_1);
		$this->assign("line1_2", $line1_2);
		$this->assign("line1_3", $line1_3);
		$this->assign("line1_4", $line1_4);
		
		$this->assign("line2_1", $line2_1);
		$this->assign("line2_2", $line2_2);
		$this->assign("line2_3", $line2_3);
		$this->assign("line2_4", $line2_4);
		$this->display();
	}
}